From: Ben Hutchings Date: Mon, 12 Mar 2018 01:14:03 +0000 (+0000) Subject: firmware_class: Refer to Debian wiki page when logging missing firmware X-Git-Tag: archive/raspbian/6.12.27-1+rpi1^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2~52 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=86e4b59f1f4b10d6bc9dc484e8ab9d411dc390ba;p=linux.git firmware_class: Refer to Debian wiki page when logging missing firmware Bug-Debian: https://bugs.debian.org/888405 Bug-Debian: https://bugs.debian.org/1053764 Forwarded: not-needed Last-Update: 2023-11-08 If firmware loading fails due to a missing file, log a second error message referring to our wiki page about firmware. This will explain why some firmware is in non-free, or can't be packaged at all. Only do this once per boot. Do something similar in the radeon drivers, where we have an early check to avoid failing at a point where we cannot display anything. Update 2023-11-08: In bug 1053764 Mario Limonciello states that the patch isn't needed anymore for amdgpu, so remove that part of the patch Gbp-Pq: Topic debian Gbp-Pq: Name firmware_class-refer-to-debian-wiki-firmware-page.patch --- diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index 210316b973d..c39faff2901 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -581,9 +581,12 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv, } __putname(path); - if (rc) + if (rc) { dev_err(device, "firmware: failed to load %s (%d)\n", fw_priv->fw_name, rc); + if (rc == -ENOENT) + pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n"); + } return rc; } diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index debfb9e575c..d565f775282 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -322,6 +322,7 @@ static int radeon_pci_probe(struct pci_dev *pdev, if ((ent->driver_data & RADEON_FAMILY_MASK) >= CHIP_R600 && !radeon_firmware_installed()) { DRM_ERROR("radeon kernel modesetting for R600 or later requires firmware installed\n"); + pr_err_once("See https://wiki.debian.org/Firmware for information about missing firmware\n"); return -ENODEV; }